package com.sx.epidemic_system.service.impl;

import com.sx.epidemic_system.entity.*;
import com.sx.epidemic_system.mapper.PatientMapper;
import com.sx.epidemic_system.service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PatientServiceImpl implements PatientService {
   @Autowired
   private PatientMapper patientMapper;
   private Patient patient=new Patient();
   @Override
   public List<MapValue> queryMapRes() {
        return patientMapper.queryMapRes();
    }
    @Override
    public List<MapValue> queryMapsNewAdd()
    {
        return patientMapper.queryMapNewAdd();
    }

    @Override
    public int getCountNum() {
        return patientMapper.getCountNum();
    }

    @Override
    public int getType2Num() {
        patient.setPatientType("2");
        return patientMapper.query(patient).size();
    }
    @Override
    public List<ChartsValue> getGruopPatientNumByTime(String provience) {
        return patientMapper.getChartsValue(provience);
    }

    @Override
    public List<ChartsValue> getGruopPatientNumByTimeOutside() {
        return patientMapper.getChartsValueOut();
    }

    @Override
    public List<Histogram> getProAndOutNum() {
        return patientMapper.getProAndOutNum();
    }

    @Override
    public List<ChartsValue> getProWzzNumGroupBytime(String province) {
        return patientMapper.getProWzzNumGroupBytime(province);
    }

    @Override
    public List<ChartsValue> getProSureGroupBytime(String province) {
        return patientMapper.getProSureGroupBytime(province);
    }

    @Override
    public List<LinesChartsValue> getProCSDNum(String province) {
        return patientMapper.getProCSDNum(province);
    }
}
